package cn.test;

public class DebitAccount extends Account{

    public DebitAccount(long id, String name, String password, String personld, String email, double balance) {
        super(id, name, password, personld, email, balance);
    }

    @Override
    public void withdraw(double money) {//取款
        if(this.getBalance()>=money){
            this.setBalance(getBalance()-money);
        }else {
            System.out.println("对不起，您的余额不足");
        }
    }
}
